<?php

	TekunaApplication :: load('components.model.ArticleModel');

	class ArticlesFeed extends AbstractMVCController {
		
		protected
			$sViewClass = 'PHPView',
			$bTranslateOutput = false,
			$bAutoloadModel = false;
		
		public function display(Request $objRequest, TekunaView $objView) {

			// find all articles
			$arrArticles = ArticleModel :: findAll();
			
			// show articles in reverse order
			$objView -> assign('articles', array_reverse($arrArticles));
			
			// change the mime type of the output
			$this -> getApplicationContext() -> getResponse() -> setContentType('application/atom+xml');
		}
	}
